package com.ruoyi.product.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.product.domain.ProductComment;
import com.ruoyi.product.mapper.ProductCommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.MycommentMapper;
import com.ruoyi.product.domain.Mycomment;
import com.ruoyi.product.service.IMycommentService;

/**
 * 商品评论Service业务层处理
 *
 * @author 林道敬
 * @date 2025-01-03
 */
@Service
public class MycommentServiceImpl extends ServiceImpl<MycommentMapper, Mycomment>  implements IMycommentService
{
    @Autowired
    private MycommentMapper mycommentMapper;

    /**
     * 查询商品评论
     *
     * @param id 商品评论主键
     * @return 商品评论
     */
    @Override
    public Mycomment selectMycommentById(Long id)
    {
        return mycommentMapper.selectMycommentById(id);
    }

    /**
     * 查询商品评论列表
     *
     * @param mycomment 商品评论
     * @return 商品评论
     */
    @Override
    public List<Mycomment> selectMycommentList(Mycomment mycomment)
    {
        return mycommentMapper.selectMycommentList(mycomment);
    }

    /**
     * 新增商品评论
     *
     * @param mycomment 商品评论
     * @return 结果
     */
    @Override
    public int insertMycomment(Mycomment mycomment)
    {
        return mycommentMapper.insertMycomment(mycomment);
    }

    /**
     * 修改商品评论
     *
     * @param mycomment 商品评论
     * @return 结果
     */
    @Override
    public int updateMycomment(Mycomment mycomment)
    {
        return mycommentMapper.updateMycomment(mycomment);
    }

    /**
     * 批量删除商品评论
     *
     * @param ids 需要删除的商品评论主键
     * @return 结果
     */
    @Override
    public int deleteMycommentByIds(Long[] ids)
    {
        return mycommentMapper.deleteMycommentByIds(ids);
    }

    /**
     * 删除商品评论信息
     *
     * @param id 商品评论主键
     * @return 结果
     */
    @Override
    public int deleteMycommentById(Long id)
    {
        return mycommentMapper.deleteMycommentById(id);
    }
}
